<?php
/*
Plugin Name: URL Shortener Addon Module
Plugin URI: http://fusedthought.com/downloads/addon-module-for-url-shortener-wordpress-plugin/
Description: This plugin addons an addon module to the <a href="http://fusedthought.com/downloads/url-shortener-wordpress-plugin/">URL Shortener Plugin</a>. It provides additional services that are currently in testing and not fully supported by the main URL Shortener Plugin yet.
Author: Gerald Yeo
Author URI: http://fusedthought.com
Version: 0.2
*/

if (!class_exists('FTShorten')){
	$exit_msg = 'The URL Shortener Addon Module requires the <a href="http://fusedthought.com/downloads/url-shortener-wordpress-plugin/">URL Shortener Plugin for WordPress</a> to be installed and activated.';
	exit($exit_msg);
}

require_once(dirname(__FILE__).'/req/class.FTShortenExtended.php');

function fts_url_beta_logo(){
	$plugin_loc_mod = WP_PLUGIN_URL.'/'.plugin_basename(dirname(__FILE__) );
	$plugin_logo_mod = '<img src="'.$plugin_loc_mod.'/plugin-logo-addon.jpg" alt="" />';
	echo $plugin_logo_mod;
}

function fts_url_beta_list(){?>
	<?php $fts_urlfx = get_option('fts_urlfx'); ?>
	<option class="betaservopt" value="googl" <?php selected( 'googl', $fts_urlfx['urlservice'] ); ?>>goo.gl (Google URL Shortener)&nbsp;</option>
	<option class="betaservopt" value="digg" <?php selected( 'digg', $fts_urlfx['urlservice'] ); ?>>Digg &nbsp;</option>
	<option class="betaservopt" value="voizle" <?php selected( 'voizle', $fts_urlfx['urlservice'] ); ?>>Voizle &nbsp;</option>
	<option class="betaservopt" value="urlinl" <?php selected( 'urlinl', $fts_urlfx['urlservice'] ); ?>>Urli.nl &nbsp;</option>
<?php }

function fts_url_beta_listinfo(){ ?>
	<?php $fts_urlfx = get_option('fts_urlfx'); ?>
	<div class="APIConfig">
		<div id="userkey_googl" class="<?php if ($fts_urlfx['urlservice'] != 'googl'){ echo "hideit";} else {echo "showit";} ?>">
			<p>No authentication / further configurations needed for this service</p>
			<p class="betaservdes"><strong>Note: </strong>Support for this service is still in BETA.</p>
		</div>
	</div>
	<div class="APIConfig">
		<div id="userkey_digg" class="<?php if ($fts_urlfx['urlservice'] != 'digg'){ echo "hideit";} else {echo "showit";} ?>">
			<p>No authentication / further configurations needed for this service</p>
			<p class="betaservdes"><strong>Note: </strong>Support for this service is still in BETA.</p>
		</div>
	</div>
	<div class="APIConfig">
		<div id="userkey_voizle" class="<?php if ($fts_urlfx['urlservice'] != 'voizle'){ echo "hideit";} else {echo "showit";} ?>">
			<p>No authentication / further configurations needed for this service</p>
			<p class="betaservdes"><strong>Note: </strong>Support for this service is still in BETA.</p>
		</div>
	</div>
	<div class="APIConfig">
		<div id="userkey_urlinl" class="<?php if ($fts_urlfx['urlservice'] != 'urlinl'){ echo "hideit";} else {echo "showit";} ?>">
			<p>No authentication / further configurations needed for this service</p>
			<p class="betaservdes"><strong>Note: </strong>Support for this service is still in BETA.</p>
		</div>
	</div>
<?php } ?>